<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../19.stringTest.js"></script>
</head>
<body>
  <script>
    //声明字符串
    let str = 'iloveyou';
    let str2 = 'lol';
    let str3 = '4xi天天都在学习学js学vue学原理';

    //测试
    //测试字符串翻转
    console.log(reverseString(str));
    //测试是否回文
    console.log(palindrome(str2));
    //测试字符串截断
    console.log(truncate(str3,5));
  </script>
</body>
</html>